import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect : '/movie'
  },
  {
    path : '/movie',
    name : 'Movie',
    component : ()=> import('@/views/movie.vue'),
    children : [
      {
        path : 'mSearch',
        name : 'mSearch',
        component : ()=> import('@/views/mSearch.vue'),
      }
    ],
  },
  {
    path : '/cinema',
    name : 'Cinema',
    component : ()=> import('@/views/cinema.vue'),
    children : [
      {
        path : 'cSearch',
        name : 'cSearch',
        component : ()=> import('@/views/cSearch.vue'),
      }
    ],
  },
  {
    path : '/mine',
    name : 'Mine',
    component : ()=> import('@/views/mine.vue')
  },
  {
    path : '/mdetail',
    name : 'Mdetail',
    component : ()=> import('@/views/mdetail.vue'),
  },
  {
    path : '/cdetail',
    name : 'Cdetail',
    component : ()=> import('@/views/cdetail.vue')
  },
  {
    path : '/login',
    name : 'Login',
    component : ()=> import('@/views/login.vue')
  },
  {
    path : '/register',
    name : 'Register',
    component : ()=> import('@/views/register.vue')
  },
  {
    path : '/buyTicket',
    name : 'BuyTicket',
    component : ()=> import('@/views/buyTicket.vue')
  },
  {
    path : '/cinemaSelect',
    name : 'CinemaSelect',
    component : ()=> import('@/views/cinemaSelect.vue')
  },
  {
    path : '/message',
    name : 'Message',
    component : ()=> import('@/page/message.vue')
  },
  {
    path : '/money',
    name : 'Money',
    component : ()=> import('@/page/money.vue')
  },
  {
    path : '/movieOrder',
    name : 'MovieOrder',
    component : ()=> import('@/page/movieOrder.vue')
  },
  {
    path : '/shopOrder',
    name : 'ShopOrder',
    component : ()=> import('@/page/shopOrder.vue')
  },
  {
    path : '/ticket',
    name : 'Ticket',
    component : ()=> import('@/page/ticket.vue')
  },
  {
    path : '/rest',
    name : 'Rest',
    component : ()=> import('@/page/rest.vue')
  },
  {
    path : '/setting',
    name : 'setting',
    component : ()=> import('@/page/setting.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
